.NET Libraries

.NET
 ├─ CLR
 └─ Libraries (as assemblies)
     ├─ BCL
     └─ FCL

Assemblies

  • Libraries in .NET are distributed as assemblies.

  • Examples:

    • System.Private.CoreLib.dll

      • It contains fundamental types:

        • Object

        • String

        • Array

        • Int32

        • Console

      • These are essential for the runtime itself.

    • System.Collections.dll

    • System.Runtime.dll

  • Assemblies contain:

    • IL (Intermediate Language) code

    • metadata

    • type definitions

  • Assemblies can be loaded dynamically.

Assembly.LoadFrom("plugin.dll");

BCL (.NET Base Class Library)

  • Is the core standard library of .NET.

  • It provides fundamental types and utilities used by nearly every .NET program.

  • System

    • Int32

    • String

    • Object

    • Math

    • Console

  • System.Collections

    • Queue<T>

    • Stack<T>

  • System.Collections.Generic

    • List<T>

    • Dictionary<TKey,TValue>

  • System.Threading

    • Thread

    • Task

    • Mutex

    • Semaphore

  • System.Threading.Tasks

  • System.IO

    • File

    • FileStream

    • BinaryReader

    • BinaryWriter

  • System.Memory

    • Span<T>

    • Memory<T>

FCL (Framework Class Library)

  • Is a broader set of libraries that includes the BCL plus higher-level APIs.

| Area          | Libraries          |
| ------------- | ------------------ |
| networking    | System.Net        |
| web           | ASP.NET           |
| UI            | WPF , WinForms   |
| serialization | System.Text.Json  |
| database      | EntityFramework   |